package org.dx.oho.entity;

import java.util.Date;
import java.util.List;
import java.util.Objects;

/**
 * create by duanx 2020/11/9
 *@description： 店铺类型
 *@classname: ShopCategory
 *@author: duanx
 *@date: 2020/11/9 14:37
 **/
public class ShopCategory extends BaseEntity {
    /**
     * 类别id
     */
    private Long shopCategoryId;
    /**
     * 类别名称
     */
    private String shopCategoryName;
    /**
     * 类别描述
     */
    private String shopCategoryDesc;
    /**
     * 类别图片
     */
    private String shopCategoryImg;
    /**
     * 优先级
     */
    private Integer priority;
    /**
     * 父类别
     */
    private ShopCategory parentId;

    /**
     * 类别下的商店
     */
    private List<Shop> shops;

    public Long getShopCategoryId() {
        return shopCategoryId;
    }

    public void setShopCategoryId(Long shopCategoryId) {
        this.shopCategoryId = shopCategoryId;
    }

    public String getShopCategoryName() {
        return shopCategoryName;
    }

    public void setShopCategoryName(String shopCategoryName) {
        this.shopCategoryName = shopCategoryName;
    }

    public String getShopCategoryDesc() {
        return shopCategoryDesc;
    }

    public void setShopCategoryDesc(String shopCategoryDesc) {
        this.shopCategoryDesc = shopCategoryDesc;
    }

    public String getShopCategoryImg() {
        return shopCategoryImg;
    }

    public void setShopCategoryImg(String shopCategoryImg) {
        this.shopCategoryImg = shopCategoryImg;
    }

    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    public ShopCategory getParentId() {
        return parentId;
    }

    public void setParentId(ShopCategory parentId) {
        this.parentId = parentId;
    }

    public List<Shop> getShops() {
        return shops;
    }

    public void setShops(List<Shop> shops) {
        this.shops = shops;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ShopCategory that = (ShopCategory) o;
        return Objects.equals(shopCategoryId, that.shopCategoryId) &&
                Objects.equals(shopCategoryName, that.shopCategoryName) &&
                Objects.equals(shopCategoryDesc, that.shopCategoryDesc) &&
                Objects.equals(shopCategoryImg, that.shopCategoryImg) &&
                Objects.equals(priority, that.priority) &&
                Objects.equals(parentId, that.parentId) &&
                Objects.equals(shops, that.shops);
    }

    @Override
    public int hashCode() {
        return Objects.hash(shopCategoryId, shopCategoryName, shopCategoryDesc, shopCategoryImg, priority, parentId, shops);
    }

    @Override
    public String toString() {
        return "ShopCategory{" +
                "shopCategoryId=" + shopCategoryId +
                ", shopCategoryName='" + shopCategoryName + '\'' +
                ", shopCategoryDesc='" + shopCategoryDesc + '\'' +
                ", shopCategoryImg='" + shopCategoryImg + '\'' +
                ", priority=" + priority +
                ", parentId=" + parentId +
                ", shops=" + shops +
                '}';
    }
}
